﻿using Morin.Shared.Configs;
using Morin.Shared.Models;

namespace Morin.Services;

public interface IAppService
{
    List<ClassModel> GetClasses(int id);
    List<MediaSourceModel> GetMediaSources();
    List<MenuModel> GetMenus();
    List<HistoryViewsModel> GetHistoryViews();
    List<HistoryViewsModel> GetHistoryViews(int sourceId);
    List<HistoryViewsModel> GetHistoryViews(int sourceId, int vodId);
    HistoryViewsModel GetHistoryView(string key);

    List<HistorySearchModel> GetHistorySearch();

    List<PlaySkipTimeModel> GetPlaySkipTimes();
    List<PlaySkipTimeModel> GetPlaySkipTimes(int sourceId, int vodId);
    PlaySkipTimeModel GetPlaySkipTime(string key);
    PlaySkipTimeModel GetPlaySkipTime(int sourceId, int vodId);

    void HistorySearchAddOrUpdate(HistorySearchModel model);
    void HistorySearchTryRemove(string key);

    void HistoryViewsAddOrUpdate(HistoryViewsModel historyView);
    void HistoryViewsTryRemove(string key);

    List<TvSourceModel> GetTvSources();
    void TvSourceAddOrUpdate(TvSourceModel model);
    void TvSourceAddOrUpdate(List<TvSourceModel> models);
    void TvSourceTryRemove(string groupTitle);

    List<FavoriteModel> GetFavorites();
    void FavoriteAddOrUpdate(FavoriteModel model);
    void FavoriteAddOrUpdate(List<FavoriteModel> models);
    void FavoriteTryRemove(string key);
    void LoadFavorites();


    void MenusSave(List<MenuModel> menus);

    void MediaSourcesTryRemove(int id);
    void MediaSourcesAddOrUpdate(MediaSourceModel media);

    void ClassesAddOrUpdate(int id, List<ClassModel> classes);

    void PlaySkipTimesTryRmove(string key);
    void PlaySkipTimeAddOrUpdate(PlaySkipTimeModel skip);

    void LoadMediaSources();
    void LoadHistoryViews();
    void LoadPlaySkipTimes();
    void LoadHistorySearch();
    void LoadTvSources();
    VideoSettingsConfig? GetVideoSettings();
}